package com.example.sonone.runnner;

import com.example.sonone.service.impl.SystemParamCacheLoader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContext;

//@Component
//@Order(1)
public class MyRunner implements CommandLineRunner {

    @Autowired
    private SystemParamCacheLoader systemParamCacheLoader;

    /**
     * 项目的上下文对象
     */
/*   @Value("${appName}")
   private String appName;*/


    @Override
    public void run(String... args) throws Exception {

//        System.out.println(appName);
        System.out.println("初始化 缓存数据  开始");

//        systemParamCacheLoader.load();

        System.out.println("初始化 缓存数据  结束");
    }
}
